import {Component, OnInit} from '@angular/core';

@Component({
  selector: 'circle-menu-component',
  templateUrl: './circle-menu.html',
  styleUrls: ['./circle-menu.css']
})
export class CircleMenuComponent implements OnInit{
  ngOnInit(): void {
    let toggle = document.querySelectorAll(".toggle")[0];
    let  nav = document.querySelectorAll("nav")[0];
    let toggle_open_text = 'Menu';
    let toggle_close_text = 'Close';

    toggle.addEventListener('click', function() {
      nav.classList.toggle('open');
      if (nav.classList.contains('open')) {
        toggle.innerHTML = toggle_close_text;
      } else {
        toggle.innerHTML = toggle_open_text;
      }
    }, false);
  }


}
